/*
 * @Author: 无聊 7989314+Hwz1997@user.noreply.gitee.com
 * @Date: 2025-09-03 02:00:51
 * @LastEditors: 无聊 7989314+Hwz1997@user.noreply.gitee.com
 * @LastEditTime: 2025-10-24 15:27:40
 * @FilePath: \keep_motion_api\routes\report.route.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const express = require('express');
const router = express.Router();
const { userProfiles, sportCalendar, rankings, dietRecords } = require('@/controllers/admin/report');

// 用户档案报表
router.get('/user-profiles', userProfiles.getProfiles);
router.get('/user-profiles/stats', userProfiles.getStats);
router.post('/user-profiles/sync', userProfiles.syncProfiles);

// 运动日历报表
router.get('/sport-calendars', sportCalendar.getCalendars);
router.get('/calendars/export', sportCalendar.exportCalendar);
router.get('/calendars/insights', sportCalendar.getInsights);

// 排行榜报表
router.get('/rankings', rankings.getRankings);
router.post('/rankings/generate', rankings.generateRankings);
router.post('/rankings/rewards', rankings.distributeRewards);
router.get('/rankings/history', rankings.getHistory);

// 饮食记录报表
router.get('/diet-records', dietRecords.getRecords);
router.get('/diet/stats', dietRecords.getStats);
router.post('/diet/ai-analysis', dietRecords.aiAnalysis);

module.exports = router;